colorscale: modify loop variables in loop body
authorBen Iofel <iofelben@gmail.com>
Mon, 17 Oct 2016 14:14:19 +0000 (10:14 -0400)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 17 Oct 2016 14:17:28 +0000 (15:17 +0100)
gtk/gtkcolorscale.c

index 0fbbf70c99626beefd92d788256888e32d9df3ec..78154551f17279408d7f67c86dc41eba668b08e7 100644 (file)
@@ -96,11 +96,11 @@ gtk_color_scale_draw_trough (GtkColorScale  *scale,
       data = g_malloc (height * stride);
 
       f = 1.0 / (height - 1);
-      for (hue_y = 0; hue_y < height; y++)
+      for (hue_y = 0; hue_y < height; hue_y++)
         {
           h = CLAMP (hue_y * f, 0.0, 1.0);
           p = data + hue_y * (stride / 4);
-          for (hue_x = 0; hue_x < width; x++)
+          for (hue_x = 0; hue_x < width; hue_x++)
             {
               gtk_hsv_to_rgb (h, 1, 1, &r, &g, &b);
               red = CLAMP (r * 255, 0, 255);